package com.item.prcatice;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Menu {

    public static void main(String[] args) {
        Method method = new Method();
        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.println("-----欢迎使用学生管理系统-----");
            System.out.println("1.添加学生");
            System.out.println("2.删除学生");
            System.out.println("3.修改学生");
            System.out.println("4.查询学生");
            System.out.println("5.退出系统");
            System.out.println("请输入你的选择：");
            int choice = scanner.nextInt();
            switch(choice){
                case 1:
                    method.add();
                    break;
                case 2:
                    method.delete();
                    break;
                case 3:
                    method.update();
                    break;
                case 4:
                    method.query();
                    break;
                case 5:
                    System.out.println("感谢你的使用，再见！");
                    System.exit(0);
                default:
                    System.out.println("请输入正确的选择！");
            }
        }
    }

}
